<form id="frm_zone_edit" method="POST" action="<?php echo $save_action; ?>">
    <?php $this->load->view('site/zone/message'); ?>
    <input id="entity_id" type="hidden" name="id" value="<?php echo $zone->id; ?>" />
    <div class="clearfix auto_height mb_10">
        <?php $buttons = $this->load->view('admin/site/zone/buttons', null, true); echo $buttons; ?>
    </div>
    <div class="form_block">
        <div class="block_header">
            Thông tin vùng
        </div>
        <div class="block_content">
            <table cellpadding="0px" cellspacing="0px">
                <?php if (isset($collection) && $collection && count($collection) > 0) :?>
                <tr>
                    <td class="frm_label">Vùng bao(*)</td>
                    <td class="frm_field">
                        <select class="std_input" name="data[parent_id]">
                            <option value="0">Là vùng chính</option>
                            <?php foreach ($parents as $parent) :?>
                            <option <?php if ($parent->id == $zone->parent_id) :?>selected="selected"<?php endif; ?> value="<?php echo $parent->id; ?>"><?php echo $parent->name; ?></option>
                            <?php endforeach; ?>
                        </select>
                    </td>
                </tr>
                <?php endif; ?>
                <tr>
                    <td class="frm_label">Kiểu(*)</td>
                    <td class="frm_field">
                        <select name="data[type]" style="width: 180px">
                            <option>Chọn kiểu hiển thị</option>
                            <?php foreach ($this->site_zone_model->get_types() as $type => $label) :?>
                            <option value="<?php echo $type; ?>" <?php if ($zone->type == $type) :?>selected="selected"<?php endif; ?>><?php echo $label; ?></option>
                            <?php endforeach; ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Tiêu đề(*)</td>
                    <td class="frm_field">
                        <input type="text" class="std_input required" name="data[heading]" value="<?php echo $zone->heading; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Mô tả</td>
                    <td class="frm_field">
                        <textarea name="data[description]"><?php echo $zone->description; ?></textarea>
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Mã vùng</td>
                    <td class="frm_field">
                        <input type="text" class="std_input" name="data[code]" value="<?php echo $zone->code; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Chiều dài</td>
                    <td class="frm_field">
                        <input type="text" class="std_input required" name="data[width]" value="<?php echo $zone->width; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Chiều rộng</td>
                    <td class="frm_field">
                        <input type="text" class="std_input required" name="data[height]" value="<?php echo $zone->height; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Lớp (CSS)</td>
                    <td class="frm_field">
                        <input type="text" class="std_input" name="data[class]" value="<?php echo $zone->class; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="frm_label">Ẩn(*)</td>
                    <td class="frm_field">
                        <select id="zone_hidden" name="data[hidden]" style="width: 180px">
                            <option>Chọn chế độ</option>
                            <option value="0" <?php if ($zone->hidden == 0) :?>selected="selected"<?php endif; ?>>Không</option>
                            <option value="1" <?php if ($zone->hidden == 1) :?>selected="selected"<?php endif; ?>>Có</option>
                        </select>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="clearfix auto_height">
        <?php echo $buttons; ?>
    </div>
</form>